import http from '@http/http'

export const searchByAid = (a, b, errMsg) => http.GET(`/api/activity/queryByaid?aid=${a}&uid=${b}`, {}, errMsg)
export const searchByName = (name, uid, errMsg) => http.GET(`/api/activity/queryByName?name=${name}&uid=${uid}`, {}, errMsg)
export const addFeekback = (feekback) => http.POST(`/api/feekback/addf`, feekback)
export const getAllByUidPage = (uid, page, size, errMsg) => http.GET(`/api/feekback/getFeekbackByUidPage?uid=${uid}&page=${page}&size=${size}`, {}, errMsg)
export const getAllActivity = (uid, errMsg) => http.GET(`/api/activity/getAllByUid?uid=${uid}`, {}, errMsg)
export const getFeekbackById = (id, errMsg) => http.GET(`/api/feekback/getFeekbackById?id=${id}`, {}, errMsg)
export const getUser = (id, errMsg) => http.GET(`/api/user/getName?id=${id}`, {}, errMsg)
export const getAct = (fid, errMsg) => http.GET(`/api/activity/getAct?fid=${fid}`, {}, errMsg)
export const updateDesc = (id, desc, status, errMsg) => http.GET(`/api/feekback/update?id=${id}&description=${desc}&status=${status}`, {}, errMsg)
export const getAllByPage = (page, size, errMsg) => http.GET(`/api/feekback/getAllByPage?page=${page}&size=${size}`, {}, errMsg)
export const getAllActivity1 = () => http.GET(`/api/activity/getAllACT`, {})
export const updateStatus1 = (id, errMsg) => http.GET(`/api/feekback/editStatus?id=${id}`, {}, errMsg)
export const searchByStatus1 = (status, page, size, errMsg) => http.GET(`/api/feekback/searchStatus1?status=${status}&page=${page}&size=${size}`, {}, errMsg)
export const getAllFeekback = () => http.GET(`/api/feekback/getAllFeek`, {})
export const getUser1 = (id, errMsg) => http.GET(`/api/user/getByFid?fid=${id}`, {}, errMsg)
export const getDistName = () => http.GET(`/api/user/getDistName`, {})
export const getDistName1 = () => http.GET(`/api/activity/getDistName`, {})
export const getFeekback = (aname, uname, status, errMsg) => http.GET(`/api/feekback/getFeekback?aname=${aname}&uname=${uname}&status=${status}`, {}, errMsg)
export const getNameByUid = (uid, errMsg) => http.GET(`/api/user/getByUid?uid=${uid}`, {}, errMsg)
export const getNameByAid = (aid, errMsg) => http.GET(`/api/activity/getByAid?aid=${aid}`, {}, errMsg)
export const saveFeedUrl = (fileUrl) => http.POST(`/api/feekback/saveFeedUrl`, fileUrl)
export const selectFeedFile = (fid, uid, errMsg) => http.GET(`/api/feekback/selectFeedFile?fid=${fid}&uid=${uid}`, {}, errMsg)
export const findAllFeedByUid = (uid, errMsg) => http.GET(`/api/feekback/findAllFeedByUid?uid=${uid}`, {}, errMsg)
